package vashion.azeroth.core.manager.personal;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import vashion.azeroth.core.dao.BaseDao;
import vashion.azeroth.core.manager.impl.BaseManagerImpl;
import vashion.azeroth.core.personal.dao.PersonalPublishFilesDao;
import vashion.azeroth.core.personal.pojo.PersonalPublishFiles;

@Service
public class PersonalPublishFilesManager extends
		BaseManagerImpl<PersonalPublishFiles> {

	@Autowired
	private PersonalPublishFilesDao personalPublishFilesDao;

	@Override
	public BaseDao<PersonalPublishFiles> getDao() {
		return personalPublishFilesDao;
	}

	public int addFile(PersonalPublishFiles publishFiles) {
		return personalPublishFilesDao.save(publishFiles);
	}

	public ArrayList<PersonalPublishFiles> getFilesByFollowUser(
			PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesByFollowUser(files);
	}

	public ArrayList<PersonalPublishFiles> getFilesByChosen(
			PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesByChosen(files);
	}

	public int findCntTimeStamp(PersonalPublishFiles files) {
		return personalPublishFilesDao.findCntTimeStamp(files);
	}

	public ArrayList<PersonalPublishFiles> getFiles(PersonalPublishFiles files) {
		return personalPublishFilesDao.getFiles(files);
	}

	public int findCntChosen(PersonalPublishFiles files) {
		return personalPublishFilesDao.findCntChosen(files);
	}

	public int findCntTags(PersonalPublishFiles files) {
		return personalPublishFilesDao.findCntTags(files);
	}

	public ArrayList<PersonalPublishFiles> getFilesByTags(
			PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesByTags(files);
	}

	public ArrayList<PersonalPublishFiles> getMyFiles(PersonalPublishFiles files) {
		return personalPublishFilesDao.getMyFiles(files);
	}

	public ArrayList<PersonalPublishFiles> getFilesById(PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesById(files);
		
	}

	public ArrayList<PersonalPublishFiles> getFilesBymemberId(
			PersonalPublishFiles files) {
		 return personalPublishFilesDao.getFilesBymemberId(files);
	}

	public int findCntMembers(PersonalPublishFiles files) {
		return personalPublishFilesDao.findCntMembers(files);
	}

	public int updateFeedsForChosen(PersonalPublishFiles files) {
		return personalPublishFilesDao.updateFeedsForChosen(files);
	}

	public int deleteFeedsByPublishFileId(PersonalPublishFiles files) {
		return  personalPublishFilesDao.deleteFeedsByPublishFileId(files);
	}

	public int restoreFeedsByPublishFileId(PersonalPublishFiles files) {
		return personalPublishFilesDao.restoreFeedsByPublishFileId(files);
	}

	public PersonalPublishFiles queryFeedStatus(PersonalPublishFiles files) {
		return personalPublishFilesDao.queryFeedStatus(files);
	}

	public ArrayList<PersonalPublishFiles> getFilesByMyFollowUser(
			PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesByMyFollowUser(files);
	}

	public int cntFilesByMyFollowUser(PersonalPublishFiles files) {
		return personalPublishFilesDao.cntFilesByMyFollowUser(files);
	}

	public ArrayList<PersonalPublishFiles> getFilesByPublishTime(
			PersonalPublishFiles files) {
		return personalPublishFilesDao.getFilesByPublishTime(files);
	}


}
